<#include "/common/_layout.html"/>
<@layout>
<h1>定时任务管理&nbsp;&nbsp;
<a href="/quartz/add">创建定时任务</a>
</h1>
<div class="table_box">
	<table class="list">
		<tbody>
			<tr>
				<th width="4%">id</th>
				<th width="20%">任务ClassName</th>
				<th width="15%">cron表达式</th>
				<th width="20">任务状态</th>
				<th width="25%">任务描述</th>
				<th width="15%">操作</th>
			</tr>
			
			<#list quartzPage.getList() as x>
			<tr>
				<td style="text-align:left;">${x.id}</td>
				<td style="text-align:left;">${x.jobClassName}</td>
				<td style="text-align:left;">${x.cronExpression}</td>
				<td style="text-align:left;">
					<#if 0 == x.jobStatus>
						暂停
					<#else>
						运行中
					</#if>
				</td>
				<td style="text-align:left;">${(x.jobInfo)!}</td>
				<td style="text-align:left;">
					<#if 0 == x.jobStatus>
						&nbsp;&nbsp;<a href="/quartz/resume/${x.id}">运行</a>
						&nbsp;&nbsp;<a href="/quartz/edit/${x.id}">修改</a>
						&nbsp;&nbsp;<a href="/quartz/delete/${x.id}">删除</a>
					<#elseif 1 == x.jobStatus || 3 == x.jobStatus>
						&nbsp;&nbsp;<a href="/quartz/pause/${x.id}">暂停</a>
					</#if>
				</td>
			</tr>
			</#list>
		</tbody>
	</table>
	<#include "/common/_paginate.html" />
	<@paginate currentPage=quartzPage.pageNumber totalPage=quartzPage.totalPage actionUrl="/quartz/" />
</div>
</@layout>